package com.easyaop.test.core.demo;

import com.easyaop.api.advisor.AspectjExpressionPointcut;

import java.lang.annotation.Annotation;

/**
 * @author lipan
 * @since 2025-02-22
 */
public abstract class AbstractAspectj {
    protected static String annotation(Class<? extends Annotation> ann) {
        return String.format("@annotation(%s)", ann.getName());
    }

    protected static AspectjExpressionPointcut aspectj(Class<? extends Annotation> ann) {
        return new AspectjExpressionPointcut(annotation(ann));
    }
}
